home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / sossnt.zip / SOSSNT / RPC / BCOPY.C < prev    next >
C/C++ Source or Header  |  1993-03-06  |  863b  |  66 lines

  1. /*
  2.  *  bcopy.c --
  3.  *      Implements bcopy(2) and bzero(2) byte operations.
  4.  *
  5.  *  Author:
  6.  *      See-Mong Tan, 6/26/88
  7.  */
  8.  
  9. #include <stdio.h>
  10.  
  11. /*
  12.  *  bcopy(char *s1, char *s2, int len) --
  13.  *      Copies len bytes from s1 to s2
  14.  */
  15. void
  16. bcopy(s1, s2, len)
  17.     char *s1, *s2;
  18.     int len;
  19. {
  20.     for(; len > 0; len--)
  21.         *s2++ = *s1++;
  22. }
  23.  
  24. void
  25. bcopy_nf(s1, s2, len)
  26.     char *s1;
  27.     char *s2;
  28.     int len;
  29. {
  30.     for(; len > 0; len--)
  31.         *s2++ = *s1++;
  32. }
  33.  
  34. void
  35. bcopy_fn(s1, s2, len)
  36.     char *s1;
  37.     char *s2;
  38.     int len;
  39. {
  40.     for(; len > 0; len--)
  41.         *s2++ = *s1++;
  42. }
  43.  
  44. void
  45. bcopy_ff(s1, s2, len)
  46.     char *s1;
  47.     char *s2;
  48.     int len;
  49. {
  50.     for(; len > 0; len--)
  51.         *s2++ = *s1++;
  52. }
  53.  
  54. /*
  55.  *  bzero(char *s, int len) --
  56.  *      Places len zero byes in s
  57.  */
  58. void
  59. bzero(s, len)
  60.     char *s;
  61.     int len;
  62. {
  63.     for(; len > 0; len--)
  64.         *s++ = (char) 0;
  65. }
  66.